package top.zywork.enums;

import lombok.Getter;

/**
 * 用户认证骑手状态
 * @author Animo
 * @Date 2020/10/14
 * @Blog http://www.ljyanimo.com
 */
@Getter
public enum CertificationCheckStatusEnum {

    TO_BE_CERTIFIED(1,"认证中"),
    CERTIFIED(2,"认证失败"),
    AUTHENTICATION_FAILED(3,"已认证");

    private Integer code;

    private String value;

    CertificationCheckStatusEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static CertificationCheckStatusEnum getEnum(Integer code){
        CertificationCheckStatusEnum[] values = CertificationCheckStatusEnum.values();
        for(CertificationCheckStatusEnum certificationCheckStatusEnum : values){
            if(certificationCheckStatusEnum.getCode().equals(code)){
                return certificationCheckStatusEnum;
            }
        }
        return null;
    }
}
